package fun;

import java.io.FileInputStream;
import java.io.IOException;


public class CharCountingTest {

	int count = 0;

	
	
	public int getCount() throws IOException {
		FileInputStream fi = new FileInputStream("www.baidu.com.txt");
//		BufferedReader br = new BufferedReader(new InputStreamReader(fi));
//		String s;
		int m;
		while( (m = fi.read() )> 0){
			if((m >= 65 && m <= 90) || (m >= 97 && m <= 122) ){
				count++;
//				System.out.print((char)m + " ");
			}
		}
		fi.close();
		System.out.println("\n" + count);
		return this.count;
	}
	
}
